package com.hippy.erya.config.threadLocal;

import java.util.Map;


public final class ActionContext {

    private ActionContext() {
        throw new IllegalStateException("ActionContext class");
    }


    /** 定义一个用于存储Map的ThreadLocal对象 */
    private static ThreadLocal<Map<String, Object>> mapContext = new ThreadLocal<>();



    public static void setMapContext(Map<String, Object> map) {
        mapContext.set(map);
    }

    public static Map<String, Object> getMapContext() {
        return mapContext.get();
    }


    public static void remove() {

        if (mapContext != null) {
            mapContext.remove();
        }
    }
}
